package com.example.entity;


import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Article {
    private Long id;
    private String title;
    private String content;
    private String flag;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    private String description;
    private Long commentCount;
    private Long userId;
    private String firstImg;
    private Long views;
    private Long typeId;
    private Integer recommend;
    private Integer top;
    private Integer hot;
    private Long likes;
    private Integer state;
    private String nickName;

    private Long type;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    public Article(String title, String content, String flag, String description, Long userId, String firstImg, Long typeId) {
        this.title = title;
        this.content = content;
        this.flag = flag;
        this.description = description;
        this.userId = userId;
        this.firstImg = firstImg;
        this.typeId = typeId;
    }
}
